﻿@{
    ViewBag.Title = "KucunShow";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<style>
    .table {
        font-size: large;
        font-family: 宋体;
    }
</style>
<h2>KucunShow</h2>

<table id="kucun" border="1" class="table table-striped" style="border:solid 1px">
    <tr>

        <th>库存编号</th>
        <th>产品名称</th>
        <th>商品总库存</th>
        <th>可用库存量</th>
        <th>库存状态</th>
        <th>销售量</th>
        <th>操作</th>
    </tr>

</table>


<script>
    //库存基本信息
    $(document).ready(function(){

    $.ajax({
        type: "get",
        url: "/Home/ShowSctok",
        success: function (d) {
            $(d).each(function(index,item){
                var ap = " <tr><td>" + item.StockID + "</td><td>" + item.Pname + "</td><td>" + item.SpotStocks + "</td><td>" + item.AvailableStocks + "</td><td>" + item.StockMS + "</td><td>" + item.Sum + "</td><td><a style='text-decoration:none' href='/Home/Get_Stock/" + item.StockID + "'>进货</a></td></tr>"
                $("#kucun").append(ap);
}
        )}
    })
    })
</script>